package survey.dao.impl;

import java.util.List;

import org.springframework.orm.ibatis.SqlMapClientTemplate;

import survey.dao.QuestionDao;
import survey.entity.Question;

public class QuestionDaoImpl extends SqlMapClientTemplate implements
		QuestionDao {
	private SqlMapClientTemplate sqlMapClientTemplate;

	public SqlMapClientTemplate getSqlMapClientTemplate() {
		return sqlMapClientTemplate;
	}

	public void setSqlMapClientTemplate(
			SqlMapClientTemplate sqlMapClientTemplate) {
		this.sqlMapClientTemplate = sqlMapClientTemplate;
	}

	public List<Question> queryQuestionByQnId(int qnId) {
		return (List<Question>) sqlMapClientTemplate.queryForList("getQuestionByQnId", qnId);
	}

}
